package com.example.robolectricsample.calc

import junit.framework.TestCase.assertEquals
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner

@RunWith(RobolectricTestRunner::class)
class CalcUtilsTest {

    private lateinit var calcUtils: CalcUtils

    @Before
    fun onStart() {
        println("start ")
        calcUtils = CalcUtils()
    }

    @Test
    fun testAdd() {
        println("testAdd ")

        val result = calcUtils.add(1, 2)
        assertEquals(3, result)
    }

    @Test
    fun testMultiple(){
        println("testMultiple ")

        val result = calcUtils.multiple(1, 2)
        assertEquals(2, result)
    }

}